package com.heima.app.controller;

import com.heima.app.service.ApUserLoginService;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dto.LoginDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @projectName: heima-leadnews
 * @package: com.heima.app.controller
 * @className: ApUser
 * @author: 躺着认真玩
 * @description: app端用户登录
 * @date: 2025/5/14 22:37
 * @version: 1.0
 */
@RestController
@Api
@RequestMapping("/api/v1/login")
public class ApUserLoginController {
    @Autowired
    private ApUserLoginService apUserLoginService;

    @PostMapping("/login_auth")
    @ApiOperation("App端用户登录")
    public ResponseResult login(@RequestBody LoginDto dto) {
        return apUserLoginService.login(dto);
    }
}
